/*
 * Copyright (c) 2005-2008 成均科技
 * All rights reserved. 
 */
/*
 * File：SysEnvironment.java
 * History:
 *       2007-12-22: Initially created, tangkf.
 */
package com.xteam.purview.base;



/**
 * 该类用于初始化和保存数据库中的环境和默认设置数据,包含如下一些内容:
 * <BR>
 * 1- 未注册功能权限的默认开放状态<BR>
 * 2- 已注册但未授权功能结点的默认开放状态<BR>
 * 3- 未授权数据规则的默认开放状态<BR>
 * 该类可能是静态或单态模式
 * @author tangkf
 *
 */
public class PurviewEnvironment {

	private static PurviewEnvironment instance;
	
	static{
		instance	= new PurviewEnvironment();
	}
	
	public static PurviewEnvironment getInstance(){
		if(instance==null) instance	= new PurviewEnvironment();
		return instance;
	}
	
	/**
	 * 1- 未注册功能权限的默认开放状态<BR>
	 */
	private boolean unRegFunOpenState	= false;
	
	/**
	 * 2- 已注册但未授权功能结点的默认开放状态<BR>
	 */
	private boolean regFunUnAuthorOpenState		= false;
	
	/**
	 * 3- 未授权数据规则的默认开放状态<BR>
	 */
	private boolean unAuthorDataRuleOpenState	= false;
	
	/**
	 * 是否开放已注册,但未授权功能
	 * @return regFunUnAuthorOpenState
	 */
	public boolean getRegFunUnAuthorOpen() {
		return regFunUnAuthorOpenState;
	}
	/**
	 * @param regFunUnAuthorOpenState 要设置的 regFunUnAuthorOpenState
	 */
	public void setRegFunUnAuthorOpenState(boolean regFunUnAuthorOpenState) {
		this.regFunUnAuthorOpenState = regFunUnAuthorOpenState;
	}
	/**
	 * @return unAuthorDataRuleOpenState
	 */
	public boolean getUnAuthorDataRuleOpenState() {
		return unAuthorDataRuleOpenState;
	}
	/**
	 * @param unAuthorDataRuleOpenState 要设置的 unAuthorDataRuleOpenState
	 */
	public void setUnAuthorDataRuleOpenState(boolean unAuthorDataRuleOpenState) {
		this.unAuthorDataRuleOpenState = unAuthorDataRuleOpenState;
	}
	/**
	 * @return unRegFunOpenState
	 */
	public boolean getUnRegFunOpen() {
		return unRegFunOpenState;
	}
	/**
	 * @param unRegFunOpenState 要设置的 unRegFunOpenState
	 */
	public void setUnRegFunOpenState(boolean unRegFunOpenState) {
		this.unRegFunOpenState = unRegFunOpenState;
	}
}
